package com.sqllog.admin.sql.controller;

import com.sqllog.admin.auth.domain.response.Result;
import com.sqllog.admin.framework.controller.ResultController;
import com.sqllog.admin.sql.entity.MainInfo;
import com.sqllog.admin.sql.service.MainInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 首页信息控制器
 *
 * @author chennengcheng
 * @date 2022-02-14 9:58
 * @remark
 */

@RestController
@RequestMapping("/mainInfo")
public class MainInfoController extends ResultController {

    @Autowired
    private MainInfoService mainInfoService;

    @GetMapping
    public Result mainInfo() {
        MainInfo mainInfo = mainInfoService.getMainInfo();
        return success(mainInfo);
    }
}
